package com.dyava.commons.validate;

public class ValidateLong extends Validate<Long,ValidateLong>{

	public ValidateLong(Long value, String name) {
		this.value = value;
		this.name = name;
	}

	
	public ValidateLong gt(long value){
		if (checkNull()) return this;
		if(this.value>value){
			return this;
		}
		throw new ValidateFastException(name+"必须大于"+value);
	}
	
	public ValidateLong lt(long value){
		if (checkNull()) return this;
		if(this.value<value){
			return this;
		}
		throw new ValidateFastException(name+"必须小于"+value);
	}
	
	public ValidateLong ge(long value){
		if (checkNull()) return this;
		if(this.value>=value){
			return this;
		}
		throw new ValidateFastException(name+"必须大于等于"+value);
	}
	
	public ValidateLong le(long value){
		if (checkNull()) return this;
		if(this.value<=value){
			return this;
		}
		throw new ValidateFastException(name+"必须小于等于"+value);
	}
	
	
	
	
}
